<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增机构收益')" />
    <th:block th:include="include :: select2-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-profit-add">
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">机构信息：</label>
                <div class="col-sm-8">
                    <select name="infoId" class="form-control">
                        <option  th:each="item:${typeList}" th:text="${item.name}+ '-' +|${item.type}|" th:value="${item.value}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">日期：</label>
                <div class="col-sm-8">
                    <input name="dateInfo" id="dateInfo" class="form-control" type="text" autocomplete="off" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">推送收益：</label>
                <div class="col-sm-8">
                    <input name="profitAmount" class="form-control" type="text" required>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: select2-js" />
    <script th:inline="javascript">
        var prefix = ctx + "special/profit"
        $("#form-profit-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-profit-add').serialize());
            }
        }

        layui.use('laydate', function(){
            var laydate = layui.laydate;
            laydate.render({
                elem: '#dateInfo',
                type: 'date'
            });
        });

    </script>
</body>
</html>